<?php
$dbh=new PDO('mysql:host=localhost;dbname=gaofei','root','root');
$page=$_GET['page']??1;
$limit=3;
$start=($page-1)*$limit;
$sql="select * from xw limit $start,$limit";
$arr=$dbh->query($sql)->fetchAll(PDO::FETCH_ASSOC);
foreach($arr as $key=>$value)
{
    ob_start();
    include "mo.php";
    file_put_contents($value['id'].'.html',ob_get_clean());

}